<template>
	<div id="Coming">
		 	<ul>
		 		<li v-for="item in comingData" :key="item.id">
		 			<div class="first">
		 				<img :src="item.img" >
		 			</div>
		 			<div class="second">
		 				<p class="title">{{item.title}}</p>
		 				<p> <span class="number font-color">{{item.number}}</span></p>
		 				<p class="actors font-color">{{item.actors}}</p>
		 				<p class="font-color">{{item.nums}}</p>
		 			</div>
		 			<div class="third">
		 				<button type="button">购票</button>
		 			</div>
		 		</li>
		 	</ul>
	</div>
</template>

<script>
	export default{
			name:'coming',
			methods:{
				getCinemaData(){
					var that=this;
					axios.get('/mock/comingData.json')
					.then(function(response){
						console.log(response);
						if(response.status==200){
							if(response.data && response.data.comingData){
								that.comingData =response.data.comingData;	
							} 
						}
					})
					.catch(function(error){
						console.log(error)
					})
				}
			},
			created(){
				this.getCinemaData();
			},
			data(){
				return{
					comingData:[]
				}
			}
		}
</script>

<style scoped>
		
	#Coming{
		width: 100%;
		padding-bottom:50px ;
	}
	img{
		width:80px;
	}
	div{
		float: left;
	}
	.first{
		width: 25%;
		margin-bottom: 5px;
	}
	.second{
		width: 55%;
	}
		
	.actors{
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;

	}
	.third{
		width: 15%;
		text-align: center;
		line-height: 90px;
		
	}
	li{
		overflow: hidden;
		margin: 10px;
		border-bottom: 2px solid #ccc ;
	}
	.title{
		font-size: 18px;
		font-weight: bolder;
		/* margin-top: 5px; */
	}
	p{
		line-height: 20px;
		margin: 5px;
	}
	.font-color{
		color: #666;
	}
	button{
		background: skyblue;
		width: 45px;
		height: 30px;
		border: none;
		color: white;
		border-radius: 5px;
		
	}
</style>
